package scene01_Home;

import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import baseClass.Layer;
import baseClass.Sprite_Default;
import mainSrc.GlobalData;
import mainSrc.GlobalSaveData;
import pck_ImageLoader.ImageLoadManager;

public class Layer02_Character
  extends Layer
{
  public boolean bChar00Exist = false;
  public boolean bChar01Exist = false;
  public boolean bChar02Exist = false;
  public int iMaxPageNumber = 2;
  public int iPageNumber = 1;
  public int iPageNumber_Cmp = -1;
  public Sprite_ButtonCharacter spb_Char00 = new Sprite_ButtonCharacter(2130837587, 256, 256, 380.0F, 300.0F, 0);
  public Sprite_ButtonCharacter spb_Char01 = new Sprite_ButtonCharacter(2130837587, 256, 256, 640.0F, 300.0F, 1);
  public Sprite_ButtonCharacter spb_Char02 = new Sprite_ButtonCharacter(2130837587, 256, 256, 900.0F, 300.0F, 2);
  public Sprite_ButtonIllust spb_IllustBtnBack = new Sprite_ButtonIllust(2130837553, 163, 163, 840.0F, 575.0F, 2);
  public Sprite_ButtonIllust spb_IllustBtnCancel = new Sprite_ButtonIllust(2130837554, 163, 163, 640.0F, 575.0F, 1);
  public Sprite_ButtonIllust spb_IllustBtnSelect = new Sprite_ButtonIllust(2130837555, 163, 163, 440.0F, 575.0F, 0);
  public Sprite_ButtonCharacter spb_Left = new Sprite_ButtonCharacter(2130837588, 151, 264, 140.0F, 300.0F, -100);
  public Sprite_ButtonCharacter spb_Right = new Sprite_ButtonCharacter(2130837592, 151, 264, 1140.0F, 300.0F, -101);
  public Sprite_Default spd_Background = new Sprite_Default(2130837586, 1180, 310, 640.0F, 300.0F);
  public Sprite_Default spd_Illust = new Sprite_Default(2130837570, 1180, 620, 640.0F, 360.0F);
  public Sprite_DefaultOpacity spd_Illust_Background = new Sprite_DefaultOpacity(2130837510, 5, 5, 1.0F, 1.0F, 170);
  public Sprite_Default spd_PageNum = new Sprite_Default(2130837590, 226, 69, 640.0F, 520.0F);
  
  public Layer02_Character()
  {
    CloseIllust();
    AddSprite(this.spd_Background);
    AddSprite(this.spd_PageNum);
    AddSprite(this.spb_Left);
    AddSprite(this.spb_Right);
    AddSprite(this.spb_Char00);
    AddSprite(this.spb_Char01);
    AddSprite(this.spb_Char02);
    AddSprite(this.spd_Illust_Background);
    AddSprite(this.spd_Illust);
    AddSprite(this.spb_IllustBtnSelect);
    AddSprite(this.spb_IllustBtnCancel);
    AddSprite(this.spb_IllustBtnBack);
  }
  
  public void CloseIllust()
  {
    this.spd_Illust_Background.visible = false;
    this.spd_Illust.visible = false;
    this.spb_IllustBtnSelect.visible = false;
    this.spb_IllustBtnCancel.visible = false;
    this.spb_IllustBtnBack.visible = false;
  }
  
  public String Make00Number(int paramInt)
  {
    if (paramInt >= 10) {
      return paramInt;
    }
    return "0" + paramInt;
  }
  
  public void SetCharacterBitmap(int paramInt)
  {
    Object localObject = new ImageLoadManager();
    int i = (this.iPageNumber - 1) * 3 + paramInt + 1;
    if ((this.iPageNumber >= 2) && (GlobalData.GetInstance().iFreeVersion == 1))
    {
      switch (paramInt)
      {
      default: 
        return;
      case 0: 
        this.spb_Char00.recycleBitmap();
        this.spb_Char00.setBitmap(2130837589);
        return;
      case 1: 
        this.spb_Char01.recycleBitmap();
        this.spb_Char01.setBitmap(2130837589);
        return;
      }
      this.spb_Char02.recycleBitmap();
      this.spb_Char02.setBitmap(2130837589);
      return;
    }
    if (((ImageLoadManager)localObject).CheckDirectoryExists("Character" + Make00Number(i), "char_default01.png"))
    {
      localObject = BitmapFactory.decodeFile(((ImageLoadManager)localObject).GetDirectory("Character" + Make00Number(i), "char_default01.png"));
      switch (paramInt)
      {
      default: 
        return;
      case 0: 
        this.spb_Char00.recycleBitmap();
        this.spb_Char00.setBitmap((Bitmap)localObject);
        this.bChar00Exist = true;
        return;
      case 1: 
        this.spb_Char01.recycleBitmap();
        this.spb_Char01.setBitmap((Bitmap)localObject);
        this.bChar01Exist = true;
        return;
      }
      this.spb_Char02.recycleBitmap();
      this.spb_Char02.setBitmap((Bitmap)localObject);
      this.bChar02Exist = true;
      return;
    }
    switch (paramInt)
    {
    default: 
      return;
    case 0: 
      this.spb_Char00.recycleBitmap();
      this.spb_Char00.setBitmap(2130837587);
      return;
    case 1: 
      this.spb_Char01.recycleBitmap();
      this.spb_Char01.setBitmap(2130837587);
      return;
    }
    this.spb_Char02.recycleBitmap();
    this.spb_Char02.setBitmap(2130837587);
  }
  
  public void ShowIllust()
  {
    this.spb_IllustBtnSelect.recycleBitmap();
    this.spb_IllustBtnCancel.recycleBitmap();
    this.spb_IllustBtnBack.recycleBitmap();
    if (GlobalSaveData.GetInstance().iLanguage == 0)
    {
      this.spb_IllustBtnSelect.setBitmap(2130837555);
      this.spb_IllustBtnCancel.setBitmap(2130837554);
      this.spb_IllustBtnBack.setBitmap(2130837553);
    }
    for (;;)
    {
      this.spd_Illust_Background.visible = true;
      this.spd_Illust.visible = true;
      this.spb_IllustBtnSelect.visible = true;
      this.spb_IllustBtnCancel.visible = true;
      this.spb_IllustBtnBack.visible = true;
      return;
      this.spb_IllustBtnSelect.setBitmap(2130837568);
      this.spb_IllustBtnCancel.setBitmap(2130837567);
      this.spb_IllustBtnBack.setBitmap(2130837566);
    }
  }
  
  public void update()
  {
    if (this.iPageNumber_Cmp != this.iPageNumber)
    {
      this.iPageNumber_Cmp = this.iPageNumber;
      this.bChar00Exist = false;
      this.bChar01Exist = false;
      this.bChar02Exist = false;
      SetCharacterBitmap(0);
      SetCharacterBitmap(1);
      SetCharacterBitmap(2);
    }
    switch (this.iPageNumber_Cmp)
    {
    default: 
      return;
    case 1: 
      this.spd_PageNum.recycleBitmap();
      this.spd_PageNum.setBitmap(2130837590);
      return;
    }
    this.spd_PageNum.recycleBitmap();
    this.spd_PageNum.setBitmap(2130837591);
  }
}


/* Location:           D:\Tool\AndroidKiller_v1.3.1\projects\petdesigner\ProjectSrc\classes-dex2jar.jar
 * Qualified Name:     scene01_Home.Layer02_Character
 * JD-Core Version:    0.7.0.1
 */